package com.liezh.decorator.data.decorators;

import com.liezh.decorator.data.DataLoader;

/**
 * @author liezh
 * @date 2021-10-27
 */
public class DataLoaderDecorator implements DataLoader {

    private DataLoader dataLoader = null;

    public DataLoaderDecorator(DataLoader dataLoader) {
        this.dataLoader = dataLoader;
    }

    @Override
    public String read() {
        return this.dataLoader.read();
    }

    @Override
    public void write(String data) {
        this.dataLoader.write(data);
    }
}
